-
Notifications
You must be signed in to change notification settings - Fork 70
Reindexing is done in background #8
base: master
Are you sure you want to change the base?
Conversation
katta
commented
Jun 24, 2013
- Made it compatible with ES v0.20.6
- Running indexing process in a background thread
|
Cool, thanks! Won't the CPU hit 100% if there is no sleep in the loop? katta@db0dc31#L2R62 And shouldn't this background thing be done via a elasticsearch feature like the river API? http://www.elasticsearch.org/guide/reference/river/ Or why did you decide to do it this way? The river is also stoppable: https://github.com/elasticsearch/elasticsearch-river-twitter/blob/master/src/main/java/org/elasticsearch/river/twitter/TwitterRiver.java#L389 |
|
Yes CPU hits 100% but not sure if sleep is a good way to control it. We Regarding doing it on river, my understanding of river is that : It is used -katta On Mon, Jun 24, 2013 at 4:11 PM, Peter notifications@github.com wrote:
|
|
ok, thanks for clarification. But this reindexing thread should be somehow stopable - isn't that also possible via the river API or at least a bit easier?
yes, or some wait+notify mechanism (or the lock.await stuff) |
|
<<ok, thanks for clarification. But this reindexing thread should be You are right, with river we can control it better. And I might be wrong in On Mon, Jun 24, 2013 at 5:17 PM, Peter notifications@github.com wrote:
|
|
That would be nice! |
|
Hey guys, I was just about to code a reindex plugin when I saw this. Personally I like the endpoint better than a river for this. I agree with @katta on what rivers are for. Not sure how that would make it better. Using an endpoint would let's you specify a query on the fly to select which documents to reindex. The same endpoint can be used to pause and resume a background thread, or return the current status if reindexing is currently in progress. I see river as an always on thing. Also, specifying X docs per second to ingest might be a good way to control CPU. |
|
Thanks! Did you tried @katta's solution? |
|
Hello, |